FROM node:16.20.0-alpine as builder
COPY ./ /dest
WORKDIR /dest
RUN npm config set registry https://registry.npm.taobao.org/ && \
    npm install && \
    npm run build

FROM nginx
COPY --from=builder /dest/dist /usr/share/nginx/html
EXPOSE 80
